﻿@model ValidationDemo.Models.Custom
@{
    ViewBag.Title = "CustomValidate";
}
<style>
    #sample > div {
        width: 100% !important;
    }

    #sample .nicEdit-main {
        width: 98% !important;
        padding: 1% !important;
        margin: 0 !important;
    }
</style>

<script src="/RTE/nicEdit.js" type="text/javascript"></script>
<script type="text/javascript">
    bkLib.onDomLoaded(function () {
        new nicEditor({
            fullPanel: true,
            uploadURI: 'nicUpload.aspx',
            iconsPath: '/RTE/nicEditorIcons.gif'
        }).panelInstance('Name');
    });
</script>

<h2>CustomValidate</h2>

@Html.ValidationSummary(true)
@using (Html.BeginForm())
{
    <div id="sample">
        <label>Name</label>
        @Html.TextAreaFor(m => m.Name)
    </div>
    <br />
    <label>Age</label>
    @Html.TextBoxFor(m=>m.Age)
    @Html.ValidationMessageFor(m=>m.Age)
    
    <br />
    <button>Validate</button>
}